package com.buss.base.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.buss.core.dic.RecordStatus;
/**
 * 使用单位信息
 * @author 高小勇
 * 创建时间:2012-1-14
 * wcms2.0
 */
@Entity
@Table(name="base_company")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Company implements Serializable {

	private static final long serialVersionUID = 1949471959216141625L;

	/**单位编码*/
	@Id
	@Column(nullable=false,length=50)
	private String id;
	
	/**单位名称*/
	@Column(nullable=false,length=200)
	private String name;
	
	/**拼音简码*/
	@Column(nullable=false,length=200)
	private String pinyin;
	
	/**公司地址*/
	@Column(length=200)
	private String address;
	
	/**邮政编码*/
	@Column(length=10)
	private String postalCode;
	
	/**联系人*/
	@Column(nullable=false,length=50)
	private String contact;
	
	/**联系电话*/
	@Column(nullable=false,length=50)
	private String contactPhone;
	
	/**公司网址*/
	@Column(length=100)
	private String companyUrl;
	
	/**QQ号码*/
	@Column(length=50)
	private String qq;
	
	/**MSN号码*/
	@Column(length=50)
	private String msn;
	
	/**电子邮件*/
	@Column(nullable=false,length=50)
	private String email;
	
	/**阿里旺旺号码*/
	@Column(nullable=false,length=50)
	private String aliwangwang;
	
	/**公司简介*/
	@Lob
	private String text;
	
	/**状态：normal:正常，deleted：已删除，disabled：不可用,默认为：normal*/
	@Enumerated(value=EnumType.STRING)
	private RecordStatus status;

	/**添加记录时间*/
	@Temporal(value=TemporalType.TIMESTAMP)
	@Column(nullable=false,updatable=false)
	private Date addDate;
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPostalCode() {
		return postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public String getCompanyUrl() {
		return companyUrl;
	}

	public void setCompanyUrl(String companyUrl) {
		this.companyUrl = companyUrl;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getMsn() {
		return msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getAliwangwang() {
		return aliwangwang;
	}

	public void setAliwangwang(String aliwangwang) {
		this.aliwangwang = aliwangwang;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public RecordStatus getStatus() {
		return status;
	}

	public void setStatus(RecordStatus status) {
		this.status = status;
	}

	public Date getAddDate() {
		return addDate;
	}

	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}
	
	
}
